1. Field of Invention
The invention relates to a technique for the optimization of a color transformation matrix, preferably so that all the coefficients of the transformation matrix have values greater than or equal to zero.
2. Description of Related Art
In most color document scanners, some form of electro-optical imaging system is used to produce a set of color image signals. Often, there are three such signals that can generally be described as red, green and blue, RGB. These signals are xe2x80x9cdevice dependentxe2x80x9d because they depend on characteristics of the scanner.
If these signals are related to the human visual system in a certain way, the device dependent signals can be processed to produce a set of signals which are xe2x80x9cdevice independentxe2x80x9d. That is, the three color image signals produced by the scanner can be expressed by three color scanner coordinates RGB, to which a transformation can be applied to describe the three scanner coordinates in terms of three visual coordinates XYZ. As used herein, these visual coordinates XYZ are tristimulus values or similar coordinates related to tristimulus values. The visual coordinates can be transmitted to an output device such as a printer, copier or display screen to output an image that corresponds to the scanned image. Because the visual coordinates are device independent, they can be transmitted to different copiers, printers or display screens and generally the same image will be output regardless of the characteristics of the scanner, copier, printer or display screen.
The ideal transformation between RGB and XYZ coordinates is a linear matrix operation shown in equations 1-3:
X=k1*R+k2*G+k3*Bxe2x80x83xe2x80x83Eq. 1
Y=k4*R+k5*G+k6*Bxe2x80x83xe2x80x83Eq. 2
Z=k7*R+k8*Gxe2x88x92k9*Bxe2x80x83xe2x80x83Eq. 3
A more compact expression is given by the matrix equation
v=Ks.xe2x80x83xe2x80x83Eq. 4
where v and s are column vectors of the visual and scanner coordinates, respectively, and K is a transformation matrix made up of kn coefficients.
It is common to determine the kn coefficients by procedures in such a way that the equations are satisfied as close as possible. Optimization schemes have been designed to try to minimize the color errors of scanned inputs by appropriate selection of the coefficients kn in the transformation matrix K.
To establish the coefficient matrix K, the scanner scans a document having a set of training colors with known XYZ values. The coefficient matrix K can then be determined such that the equations 1-3 are satisfied as closely as possible. However, this procedure may require one or more of the kn coefficients to have a negative value. When this occurs, there can be other colors not in the training set which, because of the scanner RGB values that they produce, will result in negative values of X, Y and/or Z. This results to an inconsistency because X, Y and Z are theoretically constrained to positive values. In such a case, the XYZ value will normally be set to zero, thus degrading the quality of the output image and creating inconsistencies between the scanned image and the output image.
Therefore, it is an object of the invention to optimize the coefficient matrix to cause all the coefficients to be positive.
In accordance with the invention, a color transformation matrix is determined for transforming device dependent color imaging signals into device independent color imaging signals. The transformation matrix includes a set of coefficients. The method includes: calculating an optimization value for the transformation matrix as a function of the coefficients within the transformation matrix having a value less than zero; adjusting the values of the coefficients within the transformation matrix; and determining a minimal optimization value for the transformation matrix. Preferably, the transformation matrix will have coefficients with values greater than or equal to zero.
In a preferred embodiment, the optimization value for the transformation matrix is calculated as a function of first and second components, the first component representing a color error between known device independent color signals and calculated approximately device independent color signals that are determined by using the transformation matrix, and the second component representing negative values of the coefficients within the transformation matrix. In a further preferred embodiment, the second component of the optimization value is a term whose size is proportional to the number of negative coefficients, or a term whose size is proportional to the magnitude of the negative coefficients. The first component can be any component that represents color error, including but not limited to mean color error and/or maximum color error.